package com.ruoyi.web.controller.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Classname R
 * @Description
 * @Date 2025/5/20 19:42
 * @Created by 时光偷走初心
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class R {
    private Integer code;
    private Object data;
    private String msg;

    public static R success(Object obj){
        return new R(200,obj,null);
    }

    public static R error(String msg){
        return new R(500,null,msg);
    }
}